package com.wenson.behavior.strategy;

/**
 * @ClassName: Calculator
 * @Author: luowangcheng
 * @Date: 2024/6/15 17:08
 * @Description:
 */
public class Calculator {
    private Strategy strategy;

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public int getResult(int a, int b) {
        return this.strategy.calculate(a, b);
    }
}
